package com.zhang.serviceorder.remote;

import com.zhang.internalcommon.dto.PriceRule;
import com.zhang.internalcommon.dto.PriceRuleIsNewRequest;
import com.zhang.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 类功能描述
 *
 * @author Kye
 * @date 2025-04-17
 */
@FeignClient("service-price")
public interface ServicePriceClient {
	@PostMapping("/price-rule/is-new")
	public ResponseResult<Boolean> isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

	@PostMapping("/price-rule/if-exists")
	public ResponseResult<Boolean> ifExists(@RequestBody PriceRule priceRule);

	@PostMapping("/calculate-price")
	public ResponseResult<Double> calculatePrice(@RequestParam Integer distance , @RequestParam Integer duration, @RequestParam String cityCode, @RequestParam String vehicleType);
}
